#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	char arr1[100]={'\0'};
	char arr2[100] = { '\0'};
	int num = 0;
	printf("\n");
	scanf("%s", arr1);
	printf("\n");
	scanf("%d", &num);
	char* p1 = arr1;
	char* p2 = arr2;
	
	int count = 0;
	while (*p1)
	{
		count++;
		p1++;
	}

	p1 = arr1;
	int i = 0;
	for (i = 0; i < (count - num+1); i++)
	{
		*(p2+i) = *(p1 +num-1+i);
		
	}
	for (i = 0; i < (count - num+1); i++)
	{
		printf("%c", arr2[i]);
	}
	return 0;
}